﻿Option Explicit On ' Make sure all items are explicitly declared
Option Strict On ' Be Very Strict about things here!
Namespace ZuneCardr
    ''' <summary>Destination</summary>
    ''' <author>Comentsys</author>
    ''' <version>1.0.0</version>
    ''' <created>1st February 2009</created>
    ''' <modified>1st February 2009</modified>
    ''' <remarks>Destination Data</remarks>
    Public Class Destination

        ' Public Constants

        Public Const HOME As String = "home"
        Public Const SEND_CARD As String = "send_card"
        Public Const SEND_MSG As String = "send_message"

        ' Private Constants

        Private Const ATTR_TYPE As String = "type"

        ' Private Members

        Private strType As String
        Private strName As String
        Private strURL As String

        ' Public Methods

        ''' <summary>Constructor</summary>
        ''' <param name="Element">Element to Parse</param>
        Public Sub New(ByRef Element As XElement)
            strType = Element.Attribute(ATTR_TYPE).Value
            strName = Element.<label>.Value
            strURL = Element.<url>.Value
        End Sub

        ' Public Properties

        ''' <summary>Type</summary>
        ''' <returns>Type Text</returns>
        Public ReadOnly Property Type() As String
            Get
                Return strType
            End Get
        End Property

        ''' <summary>Name</summary>
        ''' <returns>Name Text</returns>
        Public ReadOnly Property Name() As String
            Get
                Return strName
            End Get
        End Property

        ''' <summary>URL</summary>
        ''' <returns>URL Text</returns>
        Public ReadOnly Property URL() As String
            Get
                Return strURL
            End Get
        End Property

    End Class
End Namespace
